import {http} from '@/http/index.js';


/**
 * 获取订单查询汇总
 * @param {Object} data 
 */
export function getOrderSearchSummary(data) {
	return http.post('index.php/user/order/logistics_list_statistics', data);
}

/**
 * 获取订单查询列表
 * @param {Object} data 
 */
export function getOrderSearchList(data) {
	return http.post('index.php/user/orderV2/logistics_list_comprehensive', data);
}

/**
 * 获取订单查询详情
 * @param {String} order 子订单号
 */
export function getOrderSearchDetail(order) {
	return http.post('index.php/user/orderV2/logistics_child_action_list', {logistics_child_sn: order});
}

/**
 * 获取附加费用
 */
export function getOrderAdditionalChargesList() {
	return http.post('index.php/user/Order/addiCharges');
}

/**
 * 获取支付方式
 */
export function getPayTypeList() {
	return http.post('index.php/user/order/play_type_user');
}

/**
 * 取件急发/快递急发 新增编辑
 * @param {Object} data 
 */
export function pickExpressAcuteOrderInsertOrEdit (data) {
	return http.post('index.php/user/order/add_driver_my_order_two', data);
}

/**
 * 取件急发/快递集运 新增编辑
 * @param {Object} data 
 */
export function pickExpressAppointmentInsertOrEdit (data) {
	return http.post('index.php/user/OrderV2/add_appointment_order_pc', data);
}

/**
 * 获取急发订单列表
 * @param {Object} data 
 */
export function getExpressOrderList(data) {
	return http.post('index.php/user/orderV2/orderList', data);
}

/**
 * 获取集运订单列表
 * @param {Object} data 
 */
export function getAppointmentOrderList(data) {
	return http.post('index.php/user/orderV2/appointment_order_list_pc', data);
}

/**
 * 获取急发订单列表2
 * @param {Object} data 
 */
export function getExpressOrderList2(data) {
	return http.post('index.php/user/orderV2/logistics_list_pc', data);
}

/**
 * 获取集运订单列表2
 * @param {Object} data 
 */
export function getAppointmentOrderList2(data) {
	return http.post('index.php/user/orderV2/waitout_order_list', data);
}





/**
 * 删除急发订单
 * @param {String} id 
 */
export function expressOrderDelete(id) {
	return http.post('index.php/user/order/delete_advance_order', {order_id: id});
}

/**
 * 急发订单详情
 * @param {String} id 
 */
export function expressOrderDetail(id) {
	return http.post('index.php/user/orderV2/driver_my_order_detail', {order_id: id});
}

/**
 * 集运订单删除
 * @param {String} id 
 */
export function appointmentOrderDelete(id) {
	return http.post('index.php/user/orderV2/delete_recorded_order', {recorded_id: id});
}

/**
 * 集运订单详情
 * @param {String} id 
 */
export function appointmentOrderDetail(id) {
	return http.post('index.php/user/orderV2/appointment_order_detail', {recorded_id: id});
}

/**
 * 集运订单编辑
 * @param {Object} data 
 */
export function appointmentOrderEdit(data) {
	return http.post('index.php/user/OrderV2/edit_appointment_order_pc', data);
}

/**
 * 集运订单拒收
 * @param {String} id 
 */
export function appointmentOrderRejection(id) {
	return http.post('index.php/user/orderV2/refuse_recorded_order', {recorded_id: id, is_refuse: 1});
}



/**
 * 打包判断
 * @param {Number[]} ids 
 */
export function packOrderJudge(ids) {
	return http.post('index.php/user/order/StorehouseJudge_pc', {is_pc: 1, recorded_id: ids.map(item => {
		return {recorded_id: item};
	})});
}

/**
 * 打包订单预览
 * @param {Object} data 
 */
export function packOrderPreview(data) {
	return http.post('index.php/user/orderV2/storehouseJudge_pc', data);
}

/**
 * 订单打包
 * @param {Object} data 
 */
export function packOrder(data) {
	return http.post('index.php/user/orderV2/appointment_order_go_all', data);
}

/**
 * 待出仓  急发订单详情
 * @param {Number} id 
 */
export function expressOrderDetail2(id) {
	return http.post('index.php/user/orderV2/logistics_Details', {logistics_id: id});
}



/**
 * 获取母订单列表
 * @param {Object} data 
 */
export function getMainOrderList(data) {
	return http.post('index.php/user/orderV2/myLogistics', data);
}

/**
 * 获取子订单列表
 * @param {Object} data 
 */
export function getSonOrderList(data) {
	return http.post('index.php/user/orderV2/myLogisticsChild', data);
}

/**
 * 运费结算判断接口
 * @param {Number[]} ids 
 */
export function freightSettlementJudge(ids) {
	return http.post('index.php/user/order/freightCheck_shipping_one', {is_pc: 1, recorded_id: ids.map(item => {
		return {logistics_id: item};
	})});
}

/**
 * 运费结算
 * @param {Object} data 
 */
export function freightSettlement(data) {
	return http.post('index.php/User/order/Financialaudit', data);
}


/**
 * 打包仓库获取
 * @param {Number[]} ids 
 */
export function getPackWarehouse(ids) {
	return http.post('index.php/user/OrderSecond/RecordeddeliverySiteId', {recorded_id: ids[0]});
}

/**
 * 订单回退
 * @param {Sreing} id 
 */
export function orderRetuenBack(id) {
	return http.post('index.php/user/orderV2/ajaxReturnBack_all', {id});
}

/**
 * 物流详情
 * @param {Object} data
 */
export function expressDetail(data) {
	return http.post('index.php/user/OrderV2/appointment_order_list_out', data);
}

/**
 * 币种列表
 * @param {Object} data
 */
export function currenciesList(data) {
	return http.post('index.php/user/OrderV3/Currencylist', data);
}

/**
 * 币种汇率
 * @param {Object} data
 */
export function currencyExchangeRate(data) {
	return http.post('index.php/user/OrderV3/exchange_list', data);
}

/**
 * 运输方式
 * @param {Object} data
 */
export function transportationTypeList(data) {
	return http.post('index.php/user/OrderV3/transportlist', data);
}

/**
 * 渠道方式
 * @param {Object} data
 */
export function channelTypeList(data) {
	return http.post('index.php/user/OrderV3/channel_list', data);
}

/**
 * 获取代垫费用
 * @param {Object} data
 */
export function advanceMoneyAnotherList(data) {
	return http.post('index.php/user/orderV2/generateData', data);
}

/**
 * 获取二次费用
 * @param {Object} data
 */
export function secondaryCharge(data) {
	return http.post('index.php/user/orderV2/calculateTotalCost', data);
}


/**
 * 急发详情
 * @param {Object} data
 */
export function urgentDetails(data) {
	return http.post('index.php/user/orderV2/logistics_Details', data);
}

/**
 * 集运订单
 * @param {Object} data
 */
export function appointmentDetail(data) {
	return http.post('index.php/user/orderV2/appointment_order_detail', data);
}